<%@page import="java.sql.Connection"%>
<%@page import="org.blackjuly.sign.data.SystemDataSource"%>
<%@page import="org.blackjuly.sign.entity.Grade"%>
<%@page import="org.blackjuly.sign.service.GradeService"%>
<%@page language="java" pageEncoding="utf-8"%>
<%@include file="auth.jsp"%>
<%
GradeService gradeService = new GradeService();
Connection conn = SystemDataSource.getInstance().getConnection();
gradeService.setConnection(conn);
long num = gradeService.findBestId("subject");
Grade grade = null;
String id = null;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
<title>查看成绩</title>
<style type="text/css">
<!--
.STYLE1 {font-size: 14px}
-->
</style>
</head>
<body>
<table border=”1″ cellpadding=10 cellspacing=”0″ bordercolor=”#009900″>
<tr>
<td>班名</td>
<td>姓名</td>
<td>语文</td>
<td>数学</td>
<td>英语</td>
<td>物理</td>
<td>化学</td>
<td>政治</td>
<td>历史</td>
<td>总分</td>
<td>A数</td>
<td>校名</td>
<td>对比</td>
</tr>
<%
for(long i = 1 ; i <= num ; i++){
id = String.valueOf(i);
grade = gradeService.findGradeByStudent(id, "id");
%>
<tr>
  <td><%=grade.getId() %></td>
  <td><%=grade.getStudent() %></td>
  <td><%=grade.getChinese() %></td>
  <td><%=grade.getMath() %></td>
  <td><%=grade.getEnglish() %></td>
  <td><%=grade.getPhysics() %></td>
  <td><%=grade.getChemistry() %></td>
  <td><%=grade.getPolitics() %></td>
  <td><%=grade.getHistory() %></td>
  <td><%=grade.getAll() %></td>
  <td><%=grade.getA() %></td>
  <td><%=grade.getReaking() %></td>
  <td><%=grade.getContrast() %></td>
</tr>
<%}%>
</table>

</body>
</html>